package lab02.test06;

public class Ladder {
    double upground;
    double downground;
    double high;
    double area;

    public void setValue(double upground, double downground, double high) {
        this.high = high;
        this.downground = downground;
        this.upground = upground;
    }

    public void area() {
        area = ((upground + downground) * high) / 2;
        System.out.println("梯形面积是：" + area);
    }
}
